---
title: ImagingService
summary: Contract detail for ImagingService, hosted at the `Imaging` route.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-22
---

# ImagingService

`ImagingService` implements the external `IImagingService` contract and is activated over the `Imaging` route. This page documents every public operation the class exposes.

| Field | Value |
| --- | --- |
| **Service class** | `SAIF.Services.WCF.Services.ImagingService` |
| **Declared contract** | `IImagingService` — external (`SAIF.Services.WCF.Contracts`, arriving transitively via `SAIF.Framework.Core`) * |
| **Route** | `Imaging` |
| **Source** | `src/WCF/SAIF.Services.WCF.Host/Services/ImagingService.cs` |
| **Service attributes** | `[AspNetCompatibilityRequirements(RequirementsMode = Allowed)]`, `[LogErrorBehavior]` |
| **Instancing / concurrency** | WCF defaults — not overridden in source |
| **Binding** | `basicHttpBinding` (default, unnamed — no `<endpoint>` is configured for any of the six routes) |
| **Class-level authorization** | None in code |
| **Error handling** | `[LogErrorBehavior]` installs `ErrorLogErrorHandler`; see [Faults and error pipeline](../faults.md) |
| **Operations** | 2 |
| **Also hosted in** | — (a *different* `ImagingService` class/contract is hosted by `SAIF.Services.WCF32.Host`, which is not documented in this run; see [Dependencies](../dependencies.md) and [Tech debt](../tech-debt.md) — the two are not the same service) |

---

## QueueImage

Reserve an image id and write a document with its index sidecar.

| Field | Value |
| --- | --- |
| **Operation name** | `QueueImage` |
| **Contract name** | `QueueImage` — override, if any, not observable because `IImagingService` is declared in an external contracts assembly |
| **SOAP action** | Not observable — contract assembly is external |
| **Implementing member** | `SAIF.Services.WCF.Services.ImagingService.QueueImage` (`src/WCF/SAIF.Services.WCF.Host/Services/ImagingService.cs`) |
| **Pattern** | Request/response (`IsOneWay` not observable — contract assembly is external) |
| **Binding** | `basicHttpBinding` (default, unnamed) |
| **Authorization** | [None in code](../authentication-authorization.md#authorization-enforcement) |
| **Process** | [OP-012](../operations/imaging-queueimage.md) |

### QueueImage input message

| Part | Type | Required | Default | Purpose |
| --- | --- | --- | --- | --- |
| `file` | `byte[]` | Yes | — | Document bytes to persist. |
| `fileExtension` | `string` | Yes | — | Extension for the persisted document; normalized to a leading `.`. |
| `imageConfig` | `ImageConfig` | Yes | — | Imaging metadata controlling folder selection and the `.idx` sidecar content. |
| `environment` | `ApplicationEnvironment` | Yes | — | Caller-supplied environment value; not guarded by `Enforce`. |
| `taskConfig` | `ImageTaskConfig` | Unconfirmed (SOAP)** | Unconfirmed (SOAP)** | Optional task metadata passed through to the `.idx` sidecar; the observed C# implementation signature is `ImageTaskConfig taskConfig = null`. A C# optional parameter is not part of the SOAP message contract: whether this part is optional in the published message, and what (if any) default the SOAP contract itself specifies, cannot be determined from this repository without the external `IImagingService` contract/WSDL.** |

#### Complex input types

| Type | Kind | Members | Declared in |
| --- | --- | --- | --- |
| `ApplicationEnvironment` | Data contract | Not enumerated — declared in an external contracts assembly ** | `SAIF.Services.WCF.Contracts` / framework closure * |
| `ImageConfig` | Data contract | Not enumerated — declared in an external contracts assembly ** | `SAIF.Services.WCF.Contracts` / framework closure * |
| `ImageTaskConfig` | Data contract | Not enumerated — declared in an external contracts assembly ** | `SAIF.Services.WCF.Contracts` / framework closure * |

### QueueImage output message

| Field | Value |
| --- | --- |
| **Return type** | `long` |
| **Meaning** | The reserved image id assigned to the queued document. |
| **Empty-result behavior** | Not applicable — the operation always reserves and returns an id. |

### QueueImage faults

| Fault | Declared | Raised when | Surfaced as | Detail crosses the boundary |
| --- | --- | --- | --- | --- |
| `ArgumentNullException` | Not declared | See [OP-012 process detail](../operations/imaging-queueimage.md) | Generic SOAP fault produced by The operation itself, via `Enforce` | Yes |
| Oracle/NHibernate exception during id reservation | Not declared | See [OP-012 process detail](../operations/imaging-queueimage.md) | Generic SOAP fault produced by The `ErrorLogErrorHandler` installed by `[LogErrorBehavior]` | Yes |
| Filesystem exception during the document or sidecar write | Not declared | See [OP-012 process detail](../operations/imaging-queueimage.md) | Generic SOAP fault produced by The `ErrorLogErrorHandler` installed by `[LogErrorBehavior]` | Yes |

<!-- No `[FaultContract]` is declared on any operation in this host — see Faults and error pipeline. -->

### QueueImage authorization

None in code. Access to `QueueImage` rests entirely on the IIS authentication configured for the deployment variant; see [Authentication and authorization](../authentication-authorization.md#authorization-enforcement).

### QueueImage side effects

| Aspect | Finding |
| --- | --- |
| Records written | `Image` (id reservation only) |
| Downstream calls | File system (import queue) |
| Files or messages produced | Writes a document file and an `.idx` sidecar to the configured import queue folder |
| Shared state touched | None |
| Repeat-call behavior | Each call reserves a new id and writes new files; not idempotent |

---

## ReserveImageId

Reserve an image id with no accompanying file write.

| Field | Value |
| --- | --- |
| **Operation name** | `ReserveImageId` |
| **Contract name** | `ReserveImageId` — override, if any, not observable because `IImagingService` is declared in an external contracts assembly |
| **SOAP action** | Not observable — contract assembly is external |
| **Implementing member** | `SAIF.Services.WCF.Services.ImagingService.ReserveImageId` (`src/WCF/SAIF.Services.WCF.Host/Services/ImagingService.cs`) |
| **Pattern** | Request/response (`IsOneWay` not observable — contract assembly is external) |
| **Binding** | `basicHttpBinding` (default, unnamed) |
| **Authorization** | [None in code](../authentication-authorization.md#authorization-enforcement) |
| **Process** | [OP-013](../operations/imaging-reserveimageid.md) |

### ReserveImageId input message

| Part | Type | Required | Default | Purpose |
| --- | --- | --- | --- | --- |
| — | — | — | — | No input parts — the request message is empty |

### ReserveImageId output message

| Field | Value |
| --- | --- |
| **Return type** | `long` |
| **Meaning** | A freshly reserved, monotonic image id. |
| **Empty-result behavior** | Not applicable — the operation always returns a new id. |

### ReserveImageId faults

| Fault | Declared | Raised when | Surfaced as | Detail crosses the boundary |
| --- | --- | --- | --- | --- |
| Oracle/NHibernate exception | Not declared | See [OP-013 process detail](../operations/imaging-reserveimageid.md) | Generic SOAP fault produced by The `ErrorLogErrorHandler` installed by `[LogErrorBehavior]` | Yes |

<!-- No `[FaultContract]` is declared on any operation in this host — see Faults and error pipeline. -->

### ReserveImageId authorization

None in code. Access to `ReserveImageId` rests entirely on the IIS authentication configured for the deployment variant; see [Authentication and authorization](../authentication-authorization.md#authorization-enforcement).

### ReserveImageId side effects

| Aspect | Finding |
| --- | --- |
| Records written | `Image` (id reservation only) |
| Downstream calls | None |
| Files or messages produced | Consumes one image id from the sequence with no corresponding file |
| Shared state touched | None |
| Repeat-call behavior | Each call reserves a new, distinct id |


---

## Coverage checklist

| Public member | Documented section | Pattern |
| --- | --- | --- |
| `long QueueImage(byte[] file, string fileExtension, ImageConfig imageConfig, ApplicationEnvironment environment, ImageTaskConfig taskConfig)` | [`QueueImage`](#queueimage) | Request/response |
| `long ReserveImageId()` | [`ReserveImageId`](#reserveimageid) | Request/response |

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Activation and hosting](../activation-hosting.md)
- [Operations](../operations.md)
- [Faults and error pipeline](../faults.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Data model](../data-model.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- src/WCF/SAIF.Services.WCF.Host/Services/ImagingService.cs
